package com.data.unityplugin_market.util

import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.widget.TextView
import android.widget.Toast


/**
 * Created by LeoLu on 2018/5/28.
 */

object ToastUtil {

    private var mToast: Toast? = null


    fun showToast(text: String,context: Context): Toast {
        if (mToast == null) {
            mToast = Toast.makeText(context, text, Toast.LENGTH_LONG)

        }
        mToast!!.setText(text)
        mToast!!.duration = Toast.LENGTH_LONG
        mToast!!.show()
        return mToast as Toast
    }


}
